using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player_Weapon : MonoBehaviour
{
    float hurt;
    void Start()
    {
        hurt = 0;
    }
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "monster")
        {
            other.GetComponent<Monster_Control>().BeAttack(hurt);
        }
        if(other.tag == "boss")
        {
            other.GetComponent<Boss_Control>().BeAttack(hurt);
        }
    }
    void Update()
    {
        
    }
    public void SumHurt(float h)
    {
        hurt = h;
    }
}
